<!DOCTYPE html>
<html lang="en">

<head>
    <!-- META DATA -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->

    <!-- TITLE OF SITE -->
    <title>伯俊微后台</title>
    <!--linear icon css-->
    <link rel="stylesheet" href="assets/css/icon-font.min.css">
    <!--bootstrap.min.css-->
    <link rel="stylesheet" href="assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/search_box.css">
    <!--style.css-->
    <link rel="stylesheet" href="assets/css/style.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">

    <!--<script src="assets/js/bootstrap.min.js"></script>-->
    <link async rel="stylesheet" href="https://cdn.materialdesignicons.com/1.8.36/css/materialdesignicons.min.css">

    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="css/pretty.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
    <style>

        #shht {
            box-shadow: 0 0 7px #c8c8c8;
            display: none;
        }

    </style>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        a {
            text-decoration: none;
        }

        a:hover {
            text-decoration: none;
        }

        .tcdPageCode {
            padding: 15px 20px;
            /*text-align: left;*/
            color: #ccc;
            text-align: center;
        }

        .tcdPageCode a {
            display: inline-block;
            color: #428bca;

            height: 25px;
            line-height: 25px;
            padding: 0 10px;
            border: 1px solid #ddd;
            margin: 0 2px;
            border-radius: 4px;
            vertical-align: middle;
        }

        .tcdPageCode a:hover {
            text-decoration: none;
            border: 1px solid #428bca;
        }

        .tcdPageCode span.current {
            display: inline-block;
            height: 25px;
            line-height: 25px;
            padding: 0 10px;
            margin: 0 2px;
            color: #fff;
            background-color: #428bca;
            border: 1px solid #428bca;
            border-radius: 4px;
            vertical-align: middle;
        }

        .tcdPageCode span.disabled {
            display: inline-block;
            height: 25px;
            line-height: 25px;
            padding: 0 10px;
            margin: 0 2px;
            color: #bfbfbf;
            background: #f2f2f2;
            border: 1px solid #bfbfbf;
            border-radius: 4px;
            vertical-align: middle;
        }

        .table > thead > tr > td {
            line-height: 40px;
        }

        select {
            width: 10%;
            height: 34px;
            padding: 6px 12px;
            font-size: 14px;
            line-height: 1.42857143;
            color: #555;
            background-color: #fff;
            background-image: none;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

        #label {
            position: fixed;
            top: 13%;
            left: 40%;
            width: 400px;
            height: 500px;
            box-shadow: 0 0 7px #c8c8c8;
            background-color: #fff;
            display: none;
        }

        .label-value {
            float: left;
            margin: 1%;
            width: 100%;
            padding: 0 1% 4% 1%;
        }

        .label-value div {
            float: left;
            margin: 1% 0 1% 3%;
            padding-left: 2%;
            width: 20%;
            background-color: rgba(239, 200, 57, 0);
            border-radius: 25px;
        }

        .label-value span {
            padding-right: 5px;
        }

        .list {
            background-color: #fff;

            border-radius: 5px;
        }

        #label-data {

            overflow-x: hidden;
            overflow-y: scroll;
            height: 65%;
            width: 100%;
            padding-left: 5%;
            text-align: left;
        }

        #label-data::-webkit-scrollbar {
            display: none;
        }

        .label-but {
            border: 0;
            background-color: rgba(255, 255, 255, 0);
        }

        #on_lable {
            border: 0;
            text-decoration: none;
            background: #2196f3;
            color: #f2f2f2;

            margin-left: 2%;
            font-size: 16px;
            font-family: 微软雅黑, 宋体, Arial, Helvetica, Verdana, sans-serif;
            font-weight: bold;
            border-radius: 3px;
            -webkit-transition: all linear 0.30s;
            -moz-transition: all linear 0.30s;
            transition: all linear 0.30s;
            position: absolute;
            height: 40px;
            width: 80px;

            top: 10px;
            left: 23%;
        }

        #label-button {
            border: 0;
            text-decoration: none;
            background: #050057;
            color: #f2f2f2;
            height: 35px;
            width: 80px;
            font-size: 16px;
            font-family: 微软雅黑, 宋体, Arial, Helvetica, Verdana, sans-serif;
            font-weight: bold;
            border-radius: 3px;
            -webkit-transition: all linear 0.30s;
            -moz-transition: all linear 0.30s;
            transition: all linear 0.30s;
        }
    </style>
</head>

<body style="font-family: Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft">

<!-- wrapper -->
<div id="wrapper">

    <!-- navbar -->
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="brand" style="overflow: hidden;width: 12.6%;">

                <!--<img src="assets/images/logo1.png" style="display: block;width: 100%;margin: 0 auto;">-->
                <h2 style="color: #fcfdfd">控制台</h2>

        </div><!--/.brand -->
        <div class="container-fluid">
            <div class="navbar-btn">
                <button type="button" class="btn-toggle-fullwidth">
                    <i class="lnr lnr-arrow-left-circle"></i>
                </button>
            </div><!--/.navbar-btn -->
            <form class="navbar-form navbar-left" style="margin-bottom: 0;">
                <div style="line-height: 50px;font-weight: bold;">
                    <a href="index.html"
                       style="display: block;float: left;padding: 0 15px;margin: 0 10px;cursor: pointer;padding-bottom: 10px;;">总览</a>
                    <a href="javascript:void(0);" id="shht-sj"
                       style="display: block;float: left;padding: 0 15px;margin: 0 10px;cursor: pointer;padding-bottom: 10px;">
                        商户后台
                        <span class="fa fa-angle-down"
                              style="font-size:25px;position: absolute;margin: 12px 0 0 2px;">  </span>
                    </a>
                    <a href="bos-config.html"
                       style="display: block;float: left;padding: 0 15px;margin: 0 10px;cursor: pointer;padding-bottom: 10px;">系统设置</a>
                    <a href="wechat-index.html" style="display: block;float: left;padding: 0 15px;margin: 0 10px;cursor: pointer;padding-bottom: 10px;">微生活</a>
                </div>
            </form><!--/form -->
            <div id="shht"
                 style="width: 500px;height: 300px;position: absolute;top: 67px;left: 100px;background-color: #fcfdfd">

                <div style="margin-left: 180px;">
                    <h4 style=" margin: 40px 0 22px 35px; color: black; font-size: 15px;">
                        <b>会员管理</b></h4>
                    <ul style="list-style:none;font-size: 12px;margin: 20px 0 30px 35px;">
                               <li style="margin: 15px 0 0 0;"><a href="vip-wx.html">会员列表</a></li>
                        <li style="margin: 15px 0 0 0;"><a href="vip-label.html">会员标签</a></li>
                       <!-- <li style="margin: 15px 0 0 0;"><a href="#">会员列表</a></li>-->
                    </ul>
                </div>

                <div style="margin-left: 70px;margin-top: -148px;">
                    <h4 style=" margin: 62px 0 22px 35px; color: black; font-size: 15px;">
                        <b>门店管理</b></h4>
                    <ul style="list-style:none;font-size: 12px;margin: 20px 0 30px 35px;">
                         <li style="margin: 15px 0 0 0;"><a href="store.html">门店列表</a></li>
                                                               <!-- <li style="margin: 15px 0 0 0;"><a href="#">门店体系</a></li>
                         <li style="margin: 15px 0 0 0;"><a href="#">门店状态</a></li>-->
                    </ul>
                </div>
                <div style="margin-left: 70px;">
                    <h4 style=" margin: 62px 0 22px 35px; color: black; font-size: 15px;">
                        <b>营销活动</b></h4>
                    <ul style="list-style:none;font-size: 12px;margin: 20px 0 30px 35px;">
                        <li style="margin: 15px 0 0 0;"><a href="coupon-y.html">优惠券</a></li>
                        <li style="margin: 15px 0 0 0;"><a href="activity.html">活动管理</a></li>
                    </ul>
                </div>

            </div>
            <div class="navbar-menu">
                <ul class="nav navbar-nav navbar-right">

                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <!--<img src="assets/images/parson.png" class="img-circle" alt="parson-img">-->
                            <span style="font-size: 15px;color: #000;">账户信息</span>
                            <i class="icon-submenu fa fa-angle-down"></i>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="#"><i class="lnr lnr-user"></i> <span>账户信息</span></a></li>
                            <li><a href="change-password.html"><i class="lnr lnr-cog"></i> <span>修改密码</span></a></li>
                            <li id="e-exit"><a href="#"><i class="lnr lnr-envelope"></i> <span>退出登录</span></a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div><!--/.container-fluid -->

    </nav>
    <!-- END NAVBAR -->

    <!-- LEFT SIDEBAR -->
    <div id="sidebar-nav" class="sidebar">
        <div class="sidebar-scroll">
            <h3 style="color: #ffffff;padding: 0 0 0 8%">会员列表</h3>
            <nav>
                <ul class="nav">

                    <li class="active">
                        <a href="#">
                           <span >POS会员</span>
                        </a>
                    </li>

                    <li>
                        <a href="vip-wx.html">
                           <span>微信会员</span>
                        </a>
                    </li>

                </ul>
            </nav>
        </div>

    </div>
    <!-- END LEFT SIDEBAR -->

    <!-- MAIN -->
    <div class="main">

        <div class="row">
            <script type="text/javascript" src="js/angular.min.js"></script>
            <script type="text/javascript" src="js/ui-bootstrap-tpls.min.js"></script>


            <div class="col-md-6 col-sm-6" style="width: 100%;margin: 0 auto;background-color: #fff;">
                <div>
                    <p id="count" style="margin: 14px 0 14px 23px">会员共0人</p>

                    <!--<select id="c-type" style="position: absolute;left: 15%;top: 2%;">
                        <option >选择操作</option>
                        <option id="on_lable" >打标签</option>
                        <option >取消标签</option>
                    </select>-->
                    <input type="button" value="打标签" id="on_lable">
                    <!--搜索框-->
                    <div class="container" style="position: absolute;top: -20px;left: 735px;">
                        <div id="search">
                            <input id="find" type="text"><!--placeholder="输入卡号/VIP等级/开卡店仓/开卡时间,支持条件符号"-->
                            <input id="find-button" class="button" type="button" value="搜索">
                        </div>
                    </div>
                    <div class="panel">
                        <table class="table">
                            <colgroup>
                                <col width="1">
                                <col width="500">
                                <col width="900">
                                <col width="1000">
                                <col width="800">
                                <col width="800">
                                <col width="800">
                                <col width="1200">
                                <col width="800">
                                <col width="800">
                            </colgroup>
                            <thead style="line-height: 30px">
                            <tr>
                                <td>
                                    <div class="pretty primary">
                                        <input type="checkbox" id="qx">
                                        <label><i class="mdi mdi-check"></i></label>
                                    </div>
                                </td>
                                <td>头像</td>
                                <td>姓名</td>
                                <td>卡号</td>
                                <td>积分</td>
                                <td>等级</td>
                                <td>开卡人</td>
                                <td>店仓</td>
                                <td>开卡时间</td>
                                <td>操作</td>
                            </tr>
                            </thead>
                            <tbody id="data">

                            <!--<tr class="sb-tr">
                                <td>
                                    <div class="pretty primary">
                                        <input type="checkbox" class="xz" data-id="111">
                                        <label><i class="mdi mdi-check"></i></label>
                                    </div>
                                </td>
                                <td><img src=assets/images/123.png></td>
                                <td>123</td>
                                <td>123</td>
                                <td>123</td>
                                <td>123</td>
                                <td>123</td>
                                <td>123</td>
                                <td>123</td>
                                <td>删除</td>
                            </tr>


                            <tr class="sb-tr">
                                <td>
                                    <div class="pretty primary">
                                        <input type="checkbox" class="xz" data-id="555">
                                        <label><i class="mdi mdi-check"></i></label>
                                    </div>
                                </td>
                                <td><img src=assets/images/123.png></td>
                                <td>123</td>
                                <td>123</td>
                                <td>123</td>
                                <td>123</td>
                                <td>123</td>
                                <td>123</td>
                                <td>123</td>
                                <td>删除</td>
                            </tr>-->
                            </tbody>
                        </table>
                    </div>
                    <!--分页栏-->
                    <div class="tcdPageCode" style="height: 100px;"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--弹出标签-->
<div id="label">
    <div id="label-header" style="margin: 2%;">
        <span style="margin: 5%; font-size: 20px;color: #313131">添加标签</span>
        <span style="margin: 1% 0 1% 60%;" id="off_lable">返回</span>
        <div style="margin: 5%;color:#2a2a2a;" id="id_count">共选择10人</div>
        <hr>
    </div>

    <div id="label-data">

        <!--<div class="list">
            <div class="label-title">
                <div>身高</div>
            </div>
            <div class="label-value">
                <div class="label-bean" data-on="0"><input data-id="VipAttrib1" class="label-but" type="button"
                                                           value="175-180">
                </div>
                <div class="label-bean" data-on="0"><input data-id="VipAttrib1" class="label-but" type="button"
                                                           value="180-185">
                </div>
                <div class="label-bean" data-on="0"><input data-id="VipAttrib1" class="label-but" type="button"
                                                           value="185-190">
                </div>
                <div class="label-bean" data-on="0"><input data-id="VipAttrib1" class="label-but" type="button"
                                                           value="190-195">
                </div>
            </div>
        </div>-->

    </div>
    <div>
        <div style="position: absolute;top: 91%;width: 100%;">
            <input id="label-button" type="button" value="确定" style="margin-left: 34%">
        </div>
    </div>

</div>
</div>
<!-- END MAIN -->

<div class="clearfix"></div>

</div>

<script src="js/jquery.min.js"></script>

<script src="assets/js/fontawesome-all.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>


</body>
<script src="assets/js/jq.page.js"></script>

<script>
    var idlist = [];
    $("#off_lable").click(function () {
        $("#label").hide();
    });

    $("#label-button").click(function () {
        var str = '';
        $(".label-bean").each(function () {
            if ($(this).data("on") == 1) {
                var a = $(this).find("input").data("id");
                var b = $(this).find("input").val();
                str += "&" + a + "=" + b;
            }
        });

        $.ajax({
            "url": "/viptags/make/",
            "data": "phone=" + idlist+str,
            "type": "POST",
            "success": function (json) {
                if (json.state ==200){
                    alert("成功")
                } else {
                    alert(json.message)
                }
            }
        })
    });

    $("#on_lable").click(function () {

        idlist = [];
        var idcount = 0;

        $(".xz").each(function () {
            if ($(this).is(':checked')) {
                idlist.push($(this).data("id"));
                idcount = idcount + 1;
            }
        });

        $("#id_count").html("共选择" + idcount + "人");
        if (idcount == 0) {
            alert("先选择会员");
            return
        }
        $("#label").remove("display");
        $("#label").show();
    });

    /*$("div").delegate(".label-bean","click",function () {*/
    $(".label-bean").click(function () {

        if ($(this).data("on") == 0) {

            // $(this).css("border", "2px solid #131e86");
            $(this).css("background", "rgba(23,26,227,0.33)");
            $(this).data("on", "1");
            $(this).siblings().css("background", "rgba(68,189,255,0)");
            $(this).siblings().data("on", "0");

            return
        }
        if ($(this).data("on") == 1) {

            //  $(this).css("border", "0px");
            $(this).css("background", "rgba(68,189,255,0)");
            $(this).data("on", "0");

        }

    });

    $("div").delegate("#qx", "click", function () {
        if ($("#qx").is(':checked')) {

            $(".xz").prop("checked", true);
        } else {
            $(".xz").prop("checked", false);
        }

    });


    $("#shht-sj,#shht").hover(function () {
        // 鼠标移入时添加hover类

        $("#shht").css('display', 'inline')
    }, function () {
        // 鼠标移出时移出hover类

        $("#shht").css('display', 'none')
    });

</script>
<script>
    var y;

    //获取键盘搜索按钮事件
    $("#find").on('keypress', function (e) {
        var keycode = e.keyCode;
        //获取搜索框的值
        var searchContent = $(this).val();
        if (keycode == '13') {
            e.preventDefault();
            //请求搜索接口
            if (searchContent == '') {
                alert('请输入搜索内容！');
            } else {
                FindUserData(0, searchContent)
            }
        }
    });
    $(document).ready(
        getData(0),
        getTags()
    );

    function getTags() {
        $.ajax({
            "url": "/viptags/getbos/",
            "type": "POST",
            "dataType": "json",
            "success": function (json) {
                if (json.state == 200) {
                    var list = json.data.data;
                    var set = json.data.set;
                    $("#label-data").empty();

                    for (var i = 0; i < set.length; i++) {
                        var html = '<div class="list">' +
                            '            <div class="label-title">' +
                            '                <div>' + set[i].name + '</div>' +
                            '            </div>' +
                            '            <div class="label-value" id="label-typeid-' + set[i].id + '">' +
                            '            </div>' +
                            '        </div>';
                        $("#label-data").append(html);
                    }

                    for (var i = 0; i < list.length; i++) {

                        var html = '<div class="label-bean" data-on="0">' +
                            '<input data-id="VipAttrib' + list[i].typeid + '" class="label-but" type="button" value="' + list[i].name + '">' +
                            '</div>';

                        $("#label-typeid-" + list[i].typeid).append(html);

                    }


                } else {
                    alert("bos数据错误")
                }

                $(".label-bean").click(function () {

                    if ($(this).data("on") == 0) {

                        // $(this).css("border", "2px solid #131e86");
                        $(this).css("background", "rgba(23,26,227,0.33)");
                        $(this).data("on", "1");
                        $(this).siblings().css("background", "rgba(68,189,255,0)");
                        $(this).siblings().data("on", "0");

                        return
                    }
                    if ($(this).data("on") == 1) {

                        //  $(this).css("border", "0px");
                        $(this).css("background", "rgba(68,189,255,0)");
                        $(this).data("on", "0");

                    }
                });
            }
        })
    }

    $("#find-button").click(function () {
            var row = $("#find").val();
            FindUserData(0, row)
        }
    );

    function getData(start) {

        $.ajax({
            "url": "/vip/pos/",
            "data": "start=" + start,
            "type": "POST",
            "dataType": "json",
            "success": function (json) {

                var map = json;
                y = map.data.count;
                $("#count").text("会员共" + map.data.count + "人");
                $("#data").empty();
                for (var i = 0; i < map.data.data.length; i++) {
                    var html = '<tr class="sb-tr" id="tr#{id}">' +
                        '<td><div class="pretty primary"><input type="checkbox" class="xz" data-id="#{phone}">' +
                        '<label><i class="mdi mdi-check"></i></label></div></td>' +
                        '<td><img src=#{img}></td>' +
                        '<td>#{name}</td>' +
                        '<td>#{phone}</td>' +
                        '<td>#{integral}</td>' +
                        '<td>#{type}</td>' +
                        '<td>#{employee}</td>' +
                        '<td>#{store}</td>' +
                        '<td>#{customer}</td>' +
                        '<td>' +
                        '<span onclick="mod(#{id})"><i style="font-size:24px;color:#3d63b0;" class="fa fa-paint-brush"></i></span>&nbsp; &nbsp;' +
                        '<span onclick="DelData(#{id})"><i style="font-size:24px;color:#db3230;" class="fa fa-times"></i></span>' +
                        '</td></tr>';
                    html = html.replace("#{img}", map.data.data[i].img);
                    html = html.replace("#{id}", map.data.data[i].id);
                    html = html.replace("#{id}", map.data.data[i].id);
                    html = html.replace("#{id}", map.data.data[i].id);
                    html = html.replace("#{name}", map.data.data[i].name);
                    html = html.replace("#{phone}", map.data.data[i].phone);
                    html = html.replace("#{phone}", map.data.data[i].phone);
                    html = html.replace("#{integral}", map.data.data[i].integral);
                    html = html.replace("#{type}", map.data.data[i].type);
                    html = html.replace("#{store}", map.data.data[i].store);
                    html = html.replace("#{customer}", map.data.data[i].customer);
                    html = html.replace("#{employee}", map.data.data[i].employee);
                    html = html.replace("null"," ");
                    html = html.replace("null"," ");
                    $("#data").append(html);
                }
                var num = Math.floor(y / 50);
                if (num < 1) {
                    num = 1
                }
                $(".tcdPageCode").createPage({
                    pageCount: num,//总页面
                    current: start + 1,//起始页
                    backFn: function (p) {
                        console.log(p);
                        //单击回调方法，p是当前页码
                        Data(p - 1)
                    }
                });
                $(".sb-tr").hover(function () {
                    // 鼠标移入时添加hover类

                    $(this).css('background-color', 'rgba(226,238,252,0.88)')
                }, function () {
                    // 鼠标移出时移出hover类

                    $(this).css('background-color', '#ffffff')
                });
            }
        })

    }
    function mod(id) {
        location.href = "vip-pos-mod.html?id=" + id;
    }

    function Data(start) {
        $.ajax({
            "url": "/vip/pos/",
            "data": "start=" + start,
            "type": "POST",
            "dataType": "json",
            "success": function (json) {
                $("#qx").prop("checked", false);
                var map = json;
                y = map.data.count;
                $("#count").text("会员共" + map.data.count + "人");
                $("#data").empty();
                for (var i = 0; i < map.data.data.length; i++) {
                    var html = '<tr class="sb-tr" id="tr#{id}">' +
                        '<td><div class="pretty primary"><input type="checkbox" class="xz" data-id="#{phone}">' +
                        '<label><i class="mdi mdi-check"></i></label></div></td>' +
                        '<td><img src=#{img}></td>' +
                        '<td>#{name}</td>' +
                        '<td>#{phone}</td>' +
                        '<td>#{integral}</td>' +
                        '<td>#{type}</td>' +
                        '<td>#{employee}</td>' +
                        '<td>#{store}</td>' +
                        '<td>#{customer}</td>'+
                        '<td>' +
                        '<span onclick="mod(#{id})"><i style="font-size:24px;color:#3d63b0;" class="fa fa-paint-brush"></i></span>&nbsp; &nbsp;' +
                        '<span onclick="DelData(#{id})"><i style="font-size:24px;color:#db3230;" class="fa fa-times"></i></span>' +
                        '</td></tr>';
                    html = html.replace("#{img}", map.data.data[i].img);
                    html = html.replace("#{id}", map.data.data[i].id);
                    html = html.replace("#{id}", map.data.data[i].id);
                    html = html.replace("#{id}", map.data.data[i].id);
                    html = html.replace("#{name}", map.data.data[i].name);
                    html = html.replace("#{phone}", map.data.data[i].phone);
                    html = html.replace("#{phone}", map.data.data[i].phone);
                    html = html.replace("#{integral}", map.data.data[i].integral);
                    html = html.replace("#{type}", map.data.data[i].type);
                    html = html.replace("#{store}", map.data.data[i].store);
                    html = html.replace("#{customer}", map.data.data[i].customer);
                    html = html.replace("#{employee}", map.data.data[i].employee);
                    html = html.replace("null"," ");
                    html = html.replace("null"," ");
                    $("#data").append(html);
                }
                $(".sb-tr").hover(function () {
                    // 鼠标移入时添加hover类

                    $(this).css('background-color', 'rgba(226,238,252,0.88)')
                }, function () {
                    // 鼠标移出时移出hover类

                    $(this).css('background-color', '#ffffff')
                });
            }
        })
    }

    function FindUserData(start, message) {
        $.ajax({
            "url": "/vip/posfind/",
            "data": "start=" + start + "&message=" + message,
            "type": "POST",
            "dataType": "json",
            "success": function (json) {
                var map = json;
                y = map.data.count;
                $("#count").text("会员共" + map.data.count + "人");
                $("#data").empty();
                for (var i = 0; i < map.data.data.length; i++) {
                    var html = '<tr class="sb-tr" id="tr#{id}">' +
                        '<td><div class="pretty primary"><input type="checkbox" class="xz" data-id="#{phone}">' +
                        '<label><i class="mdi mdi-check"></i></label></div></td>' +
                        '<td><img src=#{img}></td>' +
                        '<td>#{name}</td>' +
                        '<td>#{phone}</td>' +
                        '<td>#{integral}</td>' +
                        '<td>#{type}</td>' +
                        '<td>#{employee}</td>' +
                        '<td>#{store}</td>' +
                        '<td>#{customer}</td>'+
                        '<td>' +
                        '<span onclick="mod(#{id})"><i style="font-size:24px;color:#3d63b0;" class="fa fa-paint-brush"></i></span>&nbsp; &nbsp;' +
                        '<span onclick="DelData(#{id})"><i style="font-size:24px;color:#db3230;" class="fa fa-times"></i></span>' +
                        '</td></tr>';
                    html = html.replace("#{img}", map.data.data[i].img);
                    html = html.replace("#{id}", map.data.data[i].id);
                    html = html.replace("#{id}", map.data.data[i].id);
                    html = html.replace("#{id}", map.data.data[i].id);
                    html = html.replace("#{name}", map.data.data[i].name);
                    html = html.replace("#{phone}", map.data.data[i].phone);
                    html = html.replace("#{phone}", map.data.data[i].phone);
                    html = html.replace("#{integral}", map.data.data[i].integral);
                    html = html.replace("#{type}", map.data.data[i].type);
                    html = html.replace("#{store}", map.data.data[i].store);
                    html = html.replace("#{customer}", map.data.data[i].customer);
                    html = html.replace("#{employee}", map.data.data[i].employee);
                    html = html.replace("null"," ");
                    html = html.replace("null"," ");
                    $("#data").append(html);
                }

                var num = Math.floor(y / 50);
                if (num < 1) {
                    num = 1
                }
                $(".tcdPageCode").createPage({

                    pageCount: num,//总页面
                    current: start + 1,//起始页
                    backFn: function (p) {
                        console.log(p);
                        //单击回调方法，p是当前页码
                        FindData(p - 1, message)
                    }
                });
                $(".sb-tr").hover(function () {
                    // 鼠标移入时添加hover类

                    $(this).css('background-color', 'rgba(226,238,252,0.88)')
                }, function () {
                    // 鼠标移出时移出hover类

                    $(this).css('background-color', '#ffffff')
                });
                $(".sb-tr").hover(function () {
                    // 鼠标移入时添加hover类

                    $(this).css('background-color', 'rgba(226,238,252,0.88)')
                }, function () {
                    // 鼠标移出时移出hover类

                    $(this).css('background-color', '#ffffff')
                });
            }
        })
    }

    function FindData(start, message) {
        $.ajax({
            "url": "/vip/posfind/",
            "data": "start=" + start + "&message=" + message,
            "type": "POST",
            "dataType": "json",
            "success": function (json) {
                var map = json;
                y = map.data.count;
                $("#count").text("会员共" + map.data.count + "人");
                $("#data").empty();
                for (var i = 0; i < map.data.data.length; i++) {
                    var html = '<tr class="sb-tr" id="tr#{id}">' +
                        '<td><div class="pretty primary"><input type="checkbox" class="xz" data-id="#{phone}">' +
                        '<label><i class="mdi mdi-check"></i></label></div></td>' +
                        '<td><img src=#{img}></td>' +
                        '<td>#{name}</td>' +
                        '<td>#{phone}</td>' +
                        '<td>#{integral}</td>' +
                        '<td>#{type}</td>' +
                        '<td>#{employee}</td>' +
                        '<td>#{store}</td>' +
                        '<td>#{customer}</td>'+
                        '<td>' +
                        '<span onclick="mod(#{id})"><i style="font-size:24px;color:#3d63b0;" class="fa fa-paint-brush"></i></span>&nbsp; &nbsp;' +
                        '<span onclick="DelData(#{id})"><i style="font-size:24px;color:#db3230;" class="fa fa-times"></i></span>' +
                        '</td></tr>';
                    html = html.replace("#{img}", map.data.data[i].img);
                    html = html.replace("#{id}", map.data.data[i].id);
                    html = html.replace("#{id}", map.data.data[i].id);
                    html = html.replace("#{id}", map.data.data[i].id);
                    html = html.replace("#{name}", map.data.data[i].name);
                    html = html.replace("#{phone}", map.data.data[i].phone);
                    html = html.replace("#{phone}", map.data.data[i].phone);
                    html = html.replace("#{integral}", map.data.data[i].integral);
                    html = html.replace("#{type}", map.data.data[i].type);
                    html = html.replace("#{store}", map.data.data[i].store);
                    html = html.replace("#{customer}", map.data.data[i].customer);
                    html = html.replace("#{employee}", map.data.data[i].employee);
                    html = html.replace("null"," ");
                    html = html.replace("null"," ");
                    $("#data").append(html);
                }
                $(".sb-tr").hover(function () {
                    // 鼠标移入时添加hover类

                    $(this).css('background-color', 'rgba(226,238,252,0.88)')
                }, function () {
                    // 鼠标移出时移出hover类

                    $(this).css('background-color', '#ffffff')
                });
            }
        })
    }
    //toto
    function DelData(id) {
        if (!confirm("确定要删除吗？")) {
            return
        }
        $.ajax({
            "url": "/vip/deluser/",
            "data": "id=" + id,
            "type": "POST",
            "dataType": "json",
            "success": function (json) {
                if (json.state == 200) {
                    $("#tr" + id).remove();
                } else {
                    alert(json.message);
                }
            }
        })
    }
</script>
<script>
    $("#e-exit").click(function () {
        $(document).ready(
            $.ajax({
                "url": "/backend/exit/",
                "type": "POST",
                "success": function () {

                    location.href = "login-system.html"

                }
            }))
    })
</script>
</html>